package GameLogic;

import org.lwjgl.opengl.Display;

public class TokiGame {
	
	protected static Logic gameLogic;
	public static void main(String... args)
	{
		long deltaTime;
		gameLogic = new Logic();
		//gameLogic.loadMenu();
		//gameLogic.loadLevel("level_map.xml");
        gameLogic.loadLevel("tokilevel.xml");
        //gameLogic.loadLevel("toki_shortlevel.xml");
        deltaTime = System.currentTimeMillis();
        
		while(!Display.isCloseRequested())
		{
			
				if(gameLogic.activeEntities==null)
					{
						continue;
					}
				if(System.currentTimeMillis() - deltaTime > 16)
				{
					deltaTime = System.currentTimeMillis();
					gameLogic.tick();
				}
		}
	}
}
